// Copyright (c) 2021 Presto Labs Pte. Ltd.
// Author: daniel

#pragma once

#include <memory>

#include "coin2/exchange/base/symbology/product_info.h"
#include "coin2/exchange/lmax_digital/symbology/constants.h"
#include "coin2/exchange/lmax_digital/symbology/product.h"

namespace coin2::exchange::lmax_digital::symbology {

inline std::unique_ptr<base::symbology::IProductHolder> GetProductHolder(
    const LmaxdigitalProduct& product) {
  using base::symbology::ProductHolder;
  static const base::symbology::ProductInfoConstant kLmaxdigitalProductInfo(
      "data/coin2/product_info/Spot.Lmaxdigital.v1.json");
  auto pi_proto = kLmaxdigitalProductInfo.GetProductInfo(product.relative_norm());
  return std::make_unique<ProductHolder>(product, pi_proto);
}

}  // namespace coin2::exchange::lmax_digital::symbology
